home *** CD-ROM | disk | FTP | other *** search
- * Program : Creates a directory
- * Author : Stephen McNabb
- * Creation date : 16th February 1995
- * Last update : 16th February 1995
- * Parameters : Address of directory name
- * Output : A negative value will be returned in d0 if the
- * directory can not be created
-
- start: jsr cls /clear the screen
- move.l #direct,-(sp) /move address of directory name to stack
- move.w #$39,-(sp) /use Dcreate() function
- trap #1 /use gemdos
- addq.l #6,sp /tidy up stack
-
- cmpi.b #0,d0 /check to see if there was an error
- blt err /if there is display an error message
-
- move.l #success,d0 /else move address of success message into d0
- bra skip /and skip the next line
- err: move.l #error,d0 /move address of error message into d0
- skip: jsr ptext /display message on screen
-
- end: bra exit /exit from program
-
- include "\SOURCE\FUNCTION.S" /include standard functions
-
- *** Program Data ***
-
- direct: dc.b '\TEST',0 /name of directory to create
- success:dc.b 'Directory created',0 /success message
- error: dc.b 'Error!',0 /error message
-
- * Note : Do no put an extra '\' on the end of the directory string
- * For some reason it doesn't work if you do
-
- *** End of file ***